* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 36px;
    margin-right: 10px;
}

.logo h1 {
    font-size: 1.5rem;
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-controls button {
    font-size: 1.2rem;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#pageInfo {
    min-width: 120px;
    text-align: center;
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button.active {
    background-color: #16a085;
}

input[type="color"] {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

input[type="range"] {
    width: 120px;
}

.container {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.sidebar {
    width: 70px;
    background-color: #34495e;
    color: white;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: width 0.3s;
    overflow-y: auto;
}

.sidebar:hover {
    width: 200px;
}

.tool-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.sidebar .tool {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #3498db;
    color: white;
    transition: background-color 0.3s;
}

.sidebar .tool:hover {
    background-color: #2980b9;
}

.sidebar .tool.active {
    background-color: #16a085;
}

.sidebar .tool svg {
    width: 24px;
    height: 24px;
}

.pages-list {
    padding-top: 20px;
    display: none;
}

.sidebar:hover .pages-list {
    display: block;
}

.pages-list h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    text-align: center;
}

#pagesList {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#pagesList li {
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#pagesList li:hover {
    background-color: #2c3e50;
}

#pagesList li.active {
    background-color: #16a085;
}

main {
    flex: 1;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#whiteboard {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
    width: 100%;
    height: 100%;
}
